<template>
	<view class="content" :style="{'min-height': (getH()-44)+'px'}">
		<view class="SearchBox">
			<view class="search">
				<input type="text" v-model="search" placeholder="请输入内容"/>
				<view class="btn" @click="Search()">搜索</view>
			</view>
		</view>
		
		<!-- 搜索列表 -->
		<view class="list">
			<view v-for="(item,index) in vaccine" :key="index">
				<vaccine :item="item"></vaccine>
			</view>
			
			<view class="other" v-if="vaccine.length>0">
				<text>已经到底啦~</text>
			</view>
		</view>
	</view>
</template>

<script>
	import vaccine from '../../subpages/vaccine/vaccine.vue'
	export default {
		data() {
			return {
				search:'',
				vaccine:[
					 {
						id:'Ab2378',
						name:'九价hpv疫苗',
						type:'2',
						introduce:'九价HPV疫苗，是用于预防人乳头瘤病毒（HPV）感染引起的宫颈癌，可以预防90%以上的宫颈癌',
						priceNext:'1099',
						notice:'接种前两小时不能进食',
						number:'300'
					}
				]
			}
		},
		components:{vaccine},
		methods: {
			getH(){
				return window.screen.height; 
			},
			Search(){
				
			}
		}
	}
</script>

<style scoped lang="scss">
	.content{
		background: linear-gradient(to bottom,rgba(235,220,225,0.5),rgba(224,232,235,0.5)) ;
		padding: 0 10px;
		display: flex;
		align-items: center;
		flex-direction: column;
		.SearchBox{
			width: 100%;
			height: 64px;
			display: flex;
			align-items: center;
			position: fixed;
			justify-content: center;
			background-color: rgba(235,220,225,0.1);
			top: 44px;
			.search{
				height: 30px;
				width: 70%;
				display: flex;
				justify-content: flex-start;
				border: 1px solid #666;
				padding: 3px 3px 3px 20px;
				border-radius: 20px;
				input{
					height: 100%;
					width: 80%;
				}
				.btn{
					width: 15%;
					padding: 5px 10px;
					text-align: center;
					background-color: #007AFF;
					color:#FFFFFF;
					border-radius: 20px;
				}
			}
		}
		
		.list{
			margin-top: 64px;
			display: flex;
			flex-direction: column;
		}
	}
	.other{
		height: 90px;
		text-align: center;
		margin-top: 15px;
		color: #aaa;
	}
	
</style>
